package com.mew.slots.core.common.messge.response;

import com.mew.slots.core.common.game.vo.AwardLine;
import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.ToString;

/**
 *  普通 有 字段不一致 继承该类  自定义
 */
@Data
@ToString
public class SlotsPlayResponseMessage extends ZebraBaseMessage<SlotsPlayResponseMessage> {

    public long betNumber; // 押注金额
    public long goldNumber; //当前背包金额
    public int expProb;   //经验值百分比;   -1 表示没有经验更新
    public long winCoin;//获取赢得的金币
    public int totalMultiple;//游戏总倍数
    public byte free;//是否有免费
    public int freeNumber;//免费游戏转动次数
    public int jpNo;//奖池编号
    public long jp;//奖池金额
    public int[] icons;//接受游戏图标
    public int[] light;//需要做动画的图标
    public AwardLine[] awardLines;//中奖线数组

    @Override
    public void write(ByteBuf b) {

        writeLong(b,betNumber);
        writeLong(b,goldNumber);
        writeInt(b, this.expProb);
        writeLong(b,winCoin);
        writeInt(b,totalMultiple);
        writeByte(b,free);
        writeInt(b,freeNumber);
        writeInt(b,jpNo);
        writeLong(b,jp);
        writeInt(b,icons.length);
        for (int icon : icons) {
            writeInt(b,icon);
        }
        writeInt(b,light.length);
        for (int i : light) {
            writeInt(b,i);
        }
        writeInt(b,awardLines.length);
        for (AwardLine awardLine : awardLines) {
            awardLine.write(b);
        }
    }


    @Override
    public SlotsPlayResponseMessage read(ByteBuf byteBuf) {
        readInt(byteBuf);
        return null;
    }
}
